﻿#pragma once
#include "XyNet/Global.h"

namespace XyNet
{
	/// rpc方法
	class XYNET_API RpcMethod : noncopyable
	{
	protected:
		RpcMethod(const string& name, int id, int serviceId)
			: _name(name), _id(id), _serviceId(serviceId) {}

	public:
		virtual ~RpcMethod() {}

		/// 获取名称
		inline const string& getName() const { return _name; }
		/// 获取id
		inline int getId() const { return _id; }
		/// 获取服务哈希
		inline int getServiceId() const { return _serviceId; }

	private:
		/// 名称
		string _name;
		/// id
		int _id;
		/// 服务id
		int _serviceId;
	};
}